import { parseTime } from '@/utils'
export default {
  props: {
    detail: {
      type: [String, Object],
      default: undefined
    },
    customerPoolType: {
      type: Number,
      default: undefined
    }
  },
  filters: {
    filterTime(v) {
      return parseTime(v, '{y}-{m}-{d} {h}:{i}:{s}')
    }
  },
  computed: {
    isCommonCustomerPool() {
      return this.customerPoolType === 0
    },
    clueCustomerId() {
      return (this.detail && this.detail.id) || ''
    }
  },
  watch: {
    clueCustomerId: {
      handler(v) {
        if (v) {
          this.initData()
        }
      },
      immediate: true
    },
    detail: {
      handler() {
        if (this.detail && Object.keys(this.detail).length > 0) {
          this.initData()
        }
      },
      immediate: true
    }
  },
  methods: {

  }
}
